<div class="row-fluid">
	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
	    <div class="btn-toolbar">
	    	<a class="btn btn-danger refresh" href="/config/crefresh?doClear=1" tips="全站缓存" style="position:relative;float:right;padding:3px 6px;margin-right:10px;margin-top:-65px">更新全站缓存</a>
		</div>
		<table class="table">
		      <thead>
		        <tr>
		          <th style="text-align:center">序号</th>
		          <th style="text-align:center">缓存模块</th>
		          <th style="text-align:center">操作</th>
		           <th style="text-align:center">序号</th>
		          <th style="text-align:center">缓存模块</th>
		          <th style="text-align:center">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php if($MCache){for($i=0;$i<ceil(count($MCache)/2);$i++){ ?>
		        <tr> 
		          <td style="text-align:center;"><?=($i*2)+1?></td>
		          <td style="text-align:center;"><?=$MCache[$i*2]['table_comment']?></td>
		          <td style="text-align:center">
		          	<a href="/config/crefresh?cid=<?=$MCache[$i*2]['table_name']?>" class="btn btn-danger refresh" tips="<?=$MCache[$i*2]['table_comment']?>" data-toggle="modal">更新缓存</a>
		          <td style="text-align:center;"><?=($i*2)+2?></td>
		          <td style="text-align:center;"><?=$MCache[($i*2)+1]['table_comment'] ?: '-'?></td>
		          <td style="text-align:center">
		          	<?php if(isset($MCache[($i*2)+1])){?>
				  	<a href="/config/crefresh?cid=<?=$MCache[$i*2]['table_name']?>" class="btn btn-danger refresh" tips="<?=$MCache[$i*2]['table_comment']?>" data-toggle="modal">更新缓存</a>
		         	<?php }else{?>
		         		-
		         	<?php }?>
		          </td>
		        </tr>
		        <?php }}else{?>
		        <td style="text-align:center;" colspan=6>无缓存数据</td></tbody>
		        <?php }?>
		      </tbody>
		   </table>
		   <span style="float:right;margin-top:-44px"><?=$page?></span>
	</div>
</div>
<script>
$(function(){
	$('.refresh').click(function(){
		if(!(window.confirm('确认更新缓存-'+$(this).attr('tips')+' ?'))){
			return false;
		}		
		window.location = $(this).attr('href');
	});
})
</script>